package name.wilbur.course.db.bigone.model;
/**
 * @author wilbur
 */

import java.sql.Date;

public class Profile extends BaseDBModel {
	private int userID;
	private int cityID;
//	private int occupationID;
	private String gender;
	private Date birthDate;
	private String phoneNumber;
	private String profileDescription;
	
	public Profile() {
	}

	public Profile(int userID, int cityID, String gender, 
			Date birthDate,	String phoneNumber, String profileDescription) {
		this.userID = userID;
		this.cityID = cityID;
//		this.occupationID = occupationID;
		this.gender = gender;
		this.birthDate = birthDate;
		this.phoneNumber = phoneNumber;
		this.profileDescription = profileDescription;
	}

	public int getCityID() {
		return cityID;
	}

	public void setCityID(int cityID) {
		this.cityID = cityID;
	}

//	public int getOccupationID() {
//		return occupationID;
//	}
//
//	public void setOccupationID(int occupationID) {
//		this.occupationID = occupationID;
//	}

	public int getUserID() {
		return userID;
	}

	public void setUserID(int userID) {
		this.userID = userID;
	}

	public String getGender() {
		return gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	public Date getBirthDate() {
		return birthDate;
	}

	public void setBirthDate(Date birthDate) {
		this.birthDate = birthDate;
	}
	
	public String getPhoneNumber() {
		return phoneNumber;
	}

	public void setPhoneNumber(String phoneNumber) {
		this.phoneNumber = phoneNumber;
	}

	public String getProfileDescription() {
		return profileDescription;
	}

	public void setProfileDescription(String profileDescription) {
		this.profileDescription = profileDescription;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = super.hashCode();
		result = prime * result
				+ ((birthDate == null) ? 0 : birthDate.hashCode());
		result = prime * result + cityID;
		result = prime * result + ((gender == null) ? 0 : gender.hashCode());
		result = prime * result
				+ ((phoneNumber == null) ? 0 : phoneNumber.hashCode());
		result = prime
				* result
				+ ((profileDescription == null) ? 0 : profileDescription
						.hashCode());
		result = prime * result + userID;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (!super.equals(obj))
			return false;
		if (getClass() != obj.getClass())
			return false;
		Profile other = (Profile) obj;
		if (birthDate == null) {
			if (other.birthDate != null)
				return false;
		} else if (!birthDate.equals(other.birthDate))
			return false;
		if (cityID != other.cityID)
			return false;
		if (gender == null) {
			if (other.gender != null)
				return false;
		} else if (!gender.equals(other.gender))
			return false;
		if (phoneNumber == null) {
			if (other.phoneNumber != null)
				return false;
		} else if (!phoneNumber.equals(other.phoneNumber))
			return false;
		if (profileDescription == null) {
			if (other.profileDescription != null)
				return false;
		} else if (!profileDescription.equals(other.profileDescription))
			return false;
		if (userID != other.userID)
			return false;
		return true;
	}
	
}
